function navigateWithToken(path) {
  // 获取存储在本地的token
  const token = localStorage.getItem('Admin-Token');

  // 检查是否获取到了token
  if (!token) {
    console.error('Token not found in localStorage.');
    return;
  }

  // 定义基础URL和端口
  const baseUrl = 'http://local.aierpeihu.com:10029';

  // 构建完整URL
  const fullUrl = `${baseUrl}${path.includes('?') ? '&' : '?'}token=${encodeURIComponent(token)}`;

  // 打开新窗口或标签页
  window.open(fullUrl);
}
